<div class="row">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h5>申请钥匙</h5>
                <div class="ibox-tools" style="top:10px;">

                </div>
            </div>
            <div class="ibox-content">
                <div class="row">
                    <div class="col-sm-5" style="text-align:center" v-show="addApplicationKeyInfo.typeFlag == '1100101'">
                        <video id="addApplicationKeyPhoto" style="width: 100%;"></video>
                        <canvas id="AddApplicationKeyCanvas" style="display:none;"></canvas>
                        <div style="margin-top:20px">
                            <button class="btn btn-primary" type="button" v-on:click="_takePhoto()"><span
                                    class="glyphicon glyphicon-camera"></span> 拍照
                            </button>
                            <span class="btn btn-default btn-file" v-on:click="_uploadPhoto($event)">
                                    <span class="fileinput-new">上传照片</span>
                                </span>
                            <input type="file" class="file" accept="images/*" id="uploadApplicationKeyPhoto" hidden
                                   v-on:change="_choosePhoto($event)">
                        </div>
                    </div>
                    <div class="col-sm-7">
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">姓名</label>
                            <div class="col-sm-10">
                                <input v-model="addApplicationKeyInfo.name" type="text" placeholder="必填，请填写姓名"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">手机号</label>
                            <div class="col-sm-10">
                                <input v-model="addApplicationKeyInfo.tel" type="text" placeholder="必填，请填写手机号"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">用户类型</label>
                            <div class="col-sm-10">
                                <select class="custom-select" v-model="addApplicationKeyInfo.typeCd">
                                    <option selected disabled value="">必填，请选择用户类型</option>
                                    <option value="10001">保洁</option>
                                    <option value="10002">保安</option>
                                    <option value="10003">其他人员</option>
                                </select></div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">钥匙类型</label>
                            <div class="col-sm-10">
                                <select class="custom-select" v-model="addApplicationKeyInfo.typeFlag">
                                    <option selected disabled value="">必填，请选择钥匙类型申请</option>
                                    <option value="1100101">人脸</option>
                                    <option value="1100102">固定密码</option>
                                    <option value="1100103">临时密码</option>
                                </select></div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">性别</label>
                            <div class="col-sm-10">
                                <select class="custom-select" v-model="addApplicationKeyInfo.sex">
                                    <option selected disabled value="">必填，请选择性别</option>
                                    <option value="0">男</option>
                                    <option value="1">女</option>
                                </select></div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">年龄</label>
                            <div class="col-sm-10">
                                <input v-model="addApplicationKeyInfo.age" type="text" placeholder="必填，请填写年龄"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">身份证号</label>
                            <div class="col-sm-10">
                                <input v-model="addApplicationKeyInfo.idCard" type="text" placeholder="必填，请填写身份证号"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">设备位置</label>
                            <div class="col-sm-10">
                                <select class="custom-select" v-model="addApplicationKeyInfo.locationTypeCd"
                                        placeholder="必填，请选择设备位置">
                                    <option selected disabled value="">必填，请选择设备位置</option>
                                    <option value="1000">东大门</option>
                                    <option value="1001">西大门</option>
                                    <option value="1002">北大门</option>
                                    <option value="1003">南大门</option>
                                    <option value="2000">单元门</option>
                                    <option value="3000">房屋门</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row"
                             v-show="addApplicationKeyInfo.locationTypeCd == '2000' || addApplicationKeyInfo.locationTypeCd == '3000'  ">
                            <label class="col-sm-2 col-form-label">归属楼栋</label>
                            <div class="col-sm-10">
                                <vc:create path="property/floorSelect2"
                                           parentModal="addApplicationKeyModel"
                                           namespace="addApplicationKey"
                                ></vc:create>
                            </div>
                        </div>
                        <div class="form-group row"
                             v-show="addApplicationKeyInfo.locationTypeCd == '2000' || addApplicationKeyInfo.locationTypeCd == '3000'  ">
                            <label class="col-sm-2 col-form-label">归属单元</label>
                            <div class="col-sm-10">
                                <vc:create path="property/unitSelect2"
                                           parentModal="addApplicationKeyModel"
                                           callBackListener="addApplicationKey"
                                           callBackFunction="notify"
                                           namespace="addApplicationKey"
                                ></vc:create>
                            </div>
                        </div>
                        <div class="form-group row"
                             v-show="addApplicationKeyInfo.locationTypeCd == '3000'  ">
                            <label class="col-sm-2 col-form-label">归属房屋</label>
                            <div class="col-sm-10">
                                <vc:create path="property/roomSelect2"
                                           parentModal="addApplicationKeyModel"
                                           callBackListener="addApplicationKey"
                                           callBackFunction="notify"
                                           namespace="addApplicationKey"
                                ></vc:create>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label">开始时间</label>
                            <div class="col-sm-10">
                                <input v-model="addApplicationKeyInfo.startTime" readonly type="text"
                                       placeholder="必填，请填写开始时间"
                                       class="form-control addApplicationStartTime">
                            </div>
                        </div>
                        <div class="form-group row" v-show="addApplicationKeyInfo.typeFlag == '1100101' || addApplicationKeyInfo.typeFlag == '1100102' ">
                            <label class="col-sm-2 col-form-label">结束时间</label>
                            <div class="col-sm-10">
                                <input v-model="addApplicationKeyInfo.endTime" readonly type="text"
                                       placeholder="必填，请填写结束时间"
                                       class="form-control addApplicationEndTime">
                            </div>
                        </div>
                        <div class="form-group row" v-if="addApplicationKeyInfo.typeFlag == '1100101'">
                            <label class="col-sm-2 col-form-label">照片</label>
                            <div class="col-sm-10"><img width="100%" height="100%"
                                                        v-bind:src="addApplicationKeyInfo.photo" alt="申请人照片"></div>
                        </div>

                        <div class="ibox-content">
                            <button class="btn btn-primary float-right" type="button"
                                    v-on:click="saveApplicationKeyInfo()"><i class="fa fa-check"></i>&nbsp;保存
                            </button>
                            <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                                    v-on:click="_closeAddApplicationKeyView()">取消
                            </button>
                        </div>
                    </div>

                    
                </div>
            </div>
        </div>
    </div>
</div>


